From 4519529fd4845674b1ecc25506975717111077e4 Mon Sep 17 00:00:00 2001 From: Igor Dubinskiy Date: Wed, 15 Nov 2017 14:11:10 -0800 Subject: [PATCH 001/597] 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 89c8a140afce2bc728b7e3e07c526f961c02f875 Mon Sep 17 00:00:00 2001 From: Chris Minton Date: Thu, 16 Nov 2017 00:19:03 +0000 Subject: [PATCH 002/597] 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 ba0532318f2ceb018a7c4a4868abb954ccdec10e Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Fri, 15 Dec 2017 22:17:06 -0800 Subject: [PATCH 003/597] 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 45d63ff33ffdb461505647e1371f3e0c1dcf7793 Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Thu, 4 Jan 2018 17:50:33 +0900 Subject: [PATCH 004/597] 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 005/597] 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 fa9a86706f4d80103b646760caf2383e90586c6d Mon Sep 17 00:00:00 2001 From: Tommy Wang Date: Fri, 5 Jan 2018 15:57:45 -0600 Subject: [PATCH 006/597] 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 36382deae08935c13fb5a7e78fe3b4840192fecf Mon Sep 17 00:00:00 2001 From: Tommy Wang Date: Wed, 10 Jan 2018 12:48:13 -0600 Subject: [PATCH 007/597] 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 d5a473d72ad0e647fa20d06bde6537ab0eae56f5 Mon Sep 17 00:00:00 2001 From: dennisatspaceape Date: Sun, 14 Jan 2018 17:10:12 +0000 Subject: [PATCH 008/597] 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 93933d4b402bf1c2b1c3ba0b1d9deb41abd6708b Mon Sep 17 00:00:00 2001 From: dennisatspaceape Date: Tue, 13 Feb 2018 18:54:33 +0000 Subject: [PATCH 009/597] 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 f8da78bd4d643c18ae97f7253f579e45a070554a Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Thu, 22 Feb 2018 23:24:25 +0900 Subject: [PATCH 010/597] 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 9926bb5a1402dbf7e2e3d7cd1876adffd215db8f Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Sat, 24 Feb 2018 01:20:26 +0900 Subject: [PATCH 011/597] 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 823388a6b617885ff501aec478ac7a852a6f7cc1 Mon Sep 17 00:00:00 2001 From: Sean Edge Date: Sun, 18 Jun 2017 20:58:13 -0400 Subject: [PATCH 012/597] 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 046ecefb9f32a6d3840233b815d1f2828cb4c731 Mon Sep 17 00:00:00 2001 From: Sean Edge Date: Sun, 25 Feb 2018 13:42:02 -0500 Subject: [PATCH 013/597] 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 014/597] 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 158741fb8660888ad3cf8b0a0cf0b1f1e5b2234c Mon Sep 17 00:00:00 2001 From: Sean Edge Date: Fri, 2 Mar 2018 10:01:57 -0500 Subject: [PATCH 015/597] 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 016/597] 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 017/597] 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 018/597] 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 019/597] 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 020/597] 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 021/597] 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 022/597] 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 ad3badaa07dc9d94416e5b3475d85380de357a23 Mon Sep 17 00:00:00 2001 From: James Renfro Date: Mon, 5 Mar 2018 06:38:49 -0800 Subject: [PATCH 023/597] 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 024/597] 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 025/597] 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 3330e2a469bf86d7f50aba9e5b7a9c430445c449 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sun, 11 Mar 2018 15:53:38 +0100 Subject: [PATCH 026/597] 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 027/597] 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 028/597] 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 029/597] 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 030/597] 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 5680139c78e9a1d33171c7efd2bfd3d6b07a547c Mon Sep 17 00:00:00 2001 From: Michael Ossareh Date: Tue, 13 Mar 2018 18:20:41 -0500 Subject: [PATCH 031/597] 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 032/597] 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 033/597] 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 3b6a5c557647a117f02feff21e55881aa6379700 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sat, 17 Feb 2018 13:48:05 +0100 Subject: [PATCH 034/597] 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 035/597] 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 036/597] 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 037/597] 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 038/597] 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 039/597] 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 040/597] 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 041/597] 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 042/597] 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 043/597] 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 044/597] 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 045/597] 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 046/597] 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 047/597] 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 048/597] 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 049/597] 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 050/597] 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 051/597] 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 052/597] 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 053/597] 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: Sat, 17 Feb 2018 14:02:38 +0100 Subject: [PATCH 054/597] 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 055/597] 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 056/597] 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 057/597] 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 5e113259418e8fb2a1f66077474dd96bb0216087 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 21 Mar 2018 11:09:36 -0400 Subject: [PATCH 058/597] 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 09d4f4ce96100b682a83cf3ae8bf589e6f36b65a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 21 Mar 2018 13:47:47 -0400 Subject: [PATCH 059/597] 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 060/597] 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 061/597] 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 062/597] 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 063/597] 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 064/597] 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 065/597] 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 066/597] #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 067/597] 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 068/597] 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 069/597] 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 070/597] 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 071/597] 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 072/597] 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 073/597] 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 074/597] 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 075/597] 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 076/597] 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 077/597] 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 078/597] 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 079/597] 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 080/597] 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 081/597] 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 e772e546c465e91d27fb704126635aa888a730ae Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 23 Mar 2018 09:29:29 -0400 Subject: [PATCH 082/597] 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 083/597] 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 084/597] 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 085/597] 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 086/597] 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 087/597] 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 088/597] 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 089/597] 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 090/597] 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 091/597] 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 0c0ceb21da3e1f5f149b895b2a33d6189223aa53 Mon Sep 17 00:00:00 2001 From: Atsushi Ishibashi Date: Sat, 24 Mar 2018 15:56:25 +0900 Subject: [PATCH 092/597] 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 093/597] 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 094/597] 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 095/597] 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 096/597] 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 097/597] 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 098/597] 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 099/597] 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 100/597] 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 101/597] 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 102/597] 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 103/597] 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 104/597] 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 105/597] 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 106/597] 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 107/597] 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 108/597] 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 109/597] 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 110/597] 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 111/597] 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 112/597] 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 113/597] 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 114/597] 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 115/597] 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 116/597] 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 117/597] 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 118/597] 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 119/597] 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 120/597] 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 121/597] 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 122/597] 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 681377a76daf43849b5e0ae8aa8ca3cc5b7da430 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 27 Mar 2018 06:18:57 -0400 Subject: [PATCH 123/597] 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 124/597] 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 125/597] 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 126/597] 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 127/597] 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 128/597] 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 129/597] 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 130/597] 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 131/597] 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 132/597] 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 133/597] 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 134/597] 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 135/597] 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 136/597] 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 137/597] 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 138/597] 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 139/597] 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 140/597] 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 141/597] 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 142/597] 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 143/597] 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 144/597] 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 145/597] 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 146/597] 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 147/597] 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 148/597] 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 149/597] 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 150/597] 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 151/597] 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 152/597] 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 153/597] 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 154/597] 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 155/597] 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 156/597] 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 157/597] 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 158/597] 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 159/597] 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 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 220/597] 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 221/597] #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 222/597] #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 223/597] #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 224/597] #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 225/597] #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 226/597] 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 81bc376dbce30368d1a43969aa300dc06a63e9e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Wojtun=CC=81?= Date: Tue, 3 Apr 2018 14:58:44 +0200 Subject: [PATCH 227/597] =?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 228/597] 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 229/597] #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 230/597] 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 231/597] 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 232/597] 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 233/597] 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 f147424b220a26a970ecb1a20846f66fc6cac867 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Thu, 29 Mar 2018 13:03:48 +0100 Subject: [PATCH 234/597] 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 235/597] 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 236/597] 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 237/597] 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 238/597] 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 239/597] 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 240/597] 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 241/597] 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 242/597] #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 243/597] 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 244/597] #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 245/597] 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 246/597] 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 247/597] 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 248/597] 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 249/597] 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 250/597] 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 251/597] 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 252/597] 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 253/597] 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 254/597] 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 255/597] 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 256/597] 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 257/597] 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 258/597] 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 259/597] 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 260/597] 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 261/597] 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 262/597] 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 263/597] 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 264/597] 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 265/597] 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 266/597] 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 267/597] 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 268/597] 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 269/597] 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 270/597] 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 271/597] 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 272/597] 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 273/597] 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 274/597] 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 275/597] 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 276/597] 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 277/597] 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 278/597] 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 279/597] 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 280/597] 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 281/597] 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 282/597] 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 283/597] 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 284/597] 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 285/597] 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 286/597] 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 287/597] 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 7c797f76fe3707922cd8dd8fea43f0871700d2a4 Mon Sep 17 00:00:00 2001 From: Stephen Coe Date: Thu, 5 Apr 2018 10:23:30 +0100 Subject: [PATCH 288/597] 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 289/597] 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 290/597] 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 291/597] 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 292/597] 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 293/597] 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 294/597] 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 295/597] 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 296/597] 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 297/597] 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 298/597] 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 299/597] 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 300/597] 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 301/597] 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 302/597] 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 303/597] 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 304/597] 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 305/597] 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 306/597] 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 307/597] 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 308/597] 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 309/597] 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 310/597] 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 b7cfea83dacd1184ca44abfe0349ba0c6258ce29 Mon Sep 17 00:00:00 2001 From: Stefan Sundin Date: Thu, 5 Apr 2018 18:44:47 -0700 Subject: [PATCH 311/597] 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 312/597] 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 313/597] 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 314/597] 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 315/597] 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 316/597] 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 317/597] 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 318/597] 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 319/597] 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 320/597] 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 321/597] 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 322/597] 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 323/597] 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 324/597] 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 325/597] 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 326/597] 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 327/597] 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 328/597] 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 329/597] 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 330/597] 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 331/597] 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 332/597] 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 333/597] 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 334/597] 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 335/597] 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 336/597] 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 337/597] 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 338/597] 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 1deac7cc3e4274152bccf21771fd7ac80ad3b735 Mon Sep 17 00:00:00 2001 From: Vahe Sahakyan Date: Sun, 8 Apr 2018 14:47:38 +0200 Subject: [PATCH 339/597] 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 340/597] 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 341/597] 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 342/597] 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 343/597] 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 344/597] 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 345/597] 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 346/597] 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 347/597] 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 348/597] 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 349/597] 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 350/597] 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 351/597] 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 352/597] 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 353/597] 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 354/597] 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 355/597] 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 356/597] 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 357/597] 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 358/597] 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 359/597] 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 360/597] 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 361/597] 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 362/597] 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 363/597] 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 364/597] 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 365/597] 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 366/597] 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 367/597] 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 368/597] 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 369/597] 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 370/597] 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 371/597] 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 372/597] 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 373/597] 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 374/597] 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 375/597] 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 376/597] 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 377/597] 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 378/597] 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 379/597] 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 380/597] 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 381/597] 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 382/597] 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 383/597] 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 384/597] 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 385/597] 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 386/597] 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 387/597] 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 388/597] 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 389/597] 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 390/597] 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 391/597] 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 392/597] 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 393/597] 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 394/597] 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 395/597] 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 396/597] 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 397/597] 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 398/597] 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 399/597] 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 400/597] 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 401/597] 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 402/597] 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 403/597] 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 404/597] 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 405/597] 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 406/597] 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 407/597] 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 408/597] 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 409/597] 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 410/597] 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 411/597] 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 412/597] 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 413/597] 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 414/597] 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 415/597] 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 416/597] 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 417/597] 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 418/597] 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 419/597] 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 420/597] 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 421/597] 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 422/597] 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 423/597] 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 424/597] 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 425/597] 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 426/597] 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 427/597] 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 428/597] 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 429/597] 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 0c4009e1dae21e6c90a8efc2243eb45ad603000a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 13 Apr 2018 09:37:40 -0400 Subject: [PATCH 430/597] 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 431/597] 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 432/597] 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 433/597] 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 434/597] 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 435/597] 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 436/597] 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 437/597] 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 438/597] 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 439/597] 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 440/597] 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 441/597] 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 442/597] 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 443/597] 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 444/597] 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 445/597] 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 446/597] 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 447/597] 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 448/597] 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 449/597] 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 450/597] 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 451/597] 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 452/597] 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 453/597] 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 454/597] 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 455/597] 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 456/597] 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 aeffaa405108cf235a2b859dd928e672bdebc488 Mon Sep 17 00:00:00 2001 From: Rob Wittman Date: Sat, 14 Apr 2018 10:57:51 -0700 Subject: [PATCH 457/597] 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 458/597] 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 459/597] 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 460/597] 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 461/597] 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 462/597] 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 463/597] 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 464/597] 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 465/597] 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 466/597] 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 467/597] 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 86c40f0acf5bb8e36a9e6ad2230cffabc71bb25b Mon Sep 17 00:00:00 2001 From: Vangelis Katsikaros Date: Mon, 16 Apr 2018 10:49:54 +0300 Subject: [PATCH 468/597] 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 469/597] [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 470/597] 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 471/597] 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 472/597] 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 473/597] 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 474/597] 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 475/597] 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 476/597] 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 477/597] 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 478/597] 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 479/597] 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 480/597] 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 481/597] 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 482/597] 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 483/597] 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 484/597] 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 7bcafda1f20b56838e514e68148af11d2e3d8190 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 17 Apr 2018 14:03:16 -0400 Subject: [PATCH 485/597] 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 486/597] 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 487/597] 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 488/597] 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 7b2eaf5d310ee53016aeaec3511b432e91108c4f Mon Sep 17 00:00:00 2001 From: Eric Lee Date: Tue, 17 Apr 2018 14:48:49 -0700 Subject: [PATCH 489/597] 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 490/597] 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 491/597] 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 492/597] 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 493/597] 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 494/597] 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 495/597] 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 496/597] 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 497/597] 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 498/597] 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 f1e0139985e59e3e0ffc444999186e52f053d01f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 18 Apr 2018 10:36:26 -0400 Subject: [PATCH 499/597] 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 500/597] 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 501/597] 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 502/597] 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 503/597] 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 504/597] 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 505/597] 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 506/597] 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 507/597] 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 508/597] 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 509/597] 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 510/597] 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 511/597] 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 512/597] 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 513/597] 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 26fd91dde34a14643e72c7498e02003e98ef2182 Mon Sep 17 00:00:00 2001 From: Devon Bleak Date: Thu, 19 Apr 2018 18:47:08 -0700 Subject: [PATCH 514/597] 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 515/597] 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 516/597] 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 fafddd8e75577272f6e5f0285009d9269c67b89a Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 08:21:08 -0400 Subject: [PATCH 517/597] 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 d40aeef7e91a580bb9503a056dae7561d9450167 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Fri, 20 Apr 2018 09:41:15 -0400 Subject: [PATCH 518/597] 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 519/597] 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 520/597] 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 521/597] 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 522/597] (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 523/597] 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 524/597] 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 525/597] 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 526/597] 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 527/597] 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 528/597] 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 529/597] 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 530/597] 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 531/597] 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 532/597] 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 533/597] 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 534/597] 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 535/597] 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 536/597] 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 537/597] 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 538/597] 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 539/597] 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 540/597] 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 541/597] 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 542/597] 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 543/597] 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 544/597] 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 545/597] 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 546/597] 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 547/597] 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 548/597] 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 549/597] 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 550/597] 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 551/597] 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 552/597] 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 553/597] 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 554/597] 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 209f5fe6c4ac62338e67762ebf7a4c921686a4a5 Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Sat, 21 Apr 2018 18:34:05 +0200 Subject: [PATCH 555/597] 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 556/597] 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 557/597] 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 558/597] 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 559/597] 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 560/597] 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 75f7b44a9286d25d71aad4a3a628d48166632d98 Mon Sep 17 00:00:00 2001 From: "Isabell (Issy) Long" Date: Sun, 22 Apr 2018 13:52:41 +0100 Subject: [PATCH 561/597] 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 63a374d47cbd251a6f12b01a57cd11ad3968d34c Mon Sep 17 00:00:00 2001 From: Joshua Carp Date: Sun, 22 Apr 2018 14:00:17 -0400 Subject: [PATCH 562/597] Drop not-working cloudtrail example Logging to s3 is the only option for the cloudtrail resource. So the current basic example doesn't work, and incorrectly implies that it's possible to log to someplace other than s3. This patch drops the basic example and relabels the s3 example as basic, since that's the simplest working configuration. --- website/docs/r/cloudtrail.html.markdown | 9 --------- 1 file changed, 9 deletions(-) diff --git a/website/docs/r/cloudtrail.html.markdown b/website/docs/r/cloudtrail.html.markdown index dbea6caf771..08e67932470 100644 --- a/website/docs/r/cloudtrail.html.markdown +++ b/website/docs/r/cloudtrail.html.markdown @@ -17,15 +17,6 @@ Provides a CloudTrail resource. Enable CloudTrail to capture all compatible management events in region. For capturing events from services like IAM, `include_global_service_events` must be enabled. -```hcl -resource "aws_cloudtrail" "example" { - name = "basic-example" - include_global_service_events = false -} -``` - -### Logging to S3 - ```hcl resource "aws_cloudtrail" "foobar" { name = "tf-trail-foobar" From c5341cead904ddd9107924d731ec8cdfb8b25bd6 Mon Sep 17 00:00:00 2001 From: Vaughan Jones Date: Mon, 23 Apr 2018 09:32:47 +1000 Subject: [PATCH 563/597] Fix formatting to display code block correctly --- website/docs/r/vpc_endpoint.html.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/website/docs/r/vpc_endpoint.html.markdown b/website/docs/r/vpc_endpoint.html.markdown index f435bfb1955..73edd8a884c 100644 --- a/website/docs/r/vpc_endpoint.html.markdown +++ b/website/docs/r/vpc_endpoint.html.markdown @@ -45,6 +45,7 @@ resource "aws_vpc_endpoint" "ec2" { ``` Custom Service Usage: + ```hcl resource "aws_vpc_endpoint" "ptfe_service" { vpc_id = "${var.vpc_id}" From cde797a7cf1f854b89ee60eebf68424428ee9625 Mon Sep 17 00:00:00 2001 From: Gregor Heine Date: Mon, 23 Apr 2018 10:28:06 +0100 Subject: [PATCH 564/597] Add batch job as a cloudwatch_event_target --- aws/resource_aws_cloudwatch_event_target.go | 72 ++++++++ ...source_aws_cloudwatch_event_target_test.go | 169 ++++++++++++++++++ .../r/cloudwatch_event_target.html.markdown | 8 + 3 files changed, 249 insertions(+) diff --git a/aws/resource_aws_cloudwatch_event_target.go b/aws/resource_aws_cloudwatch_event_target.go index 15561a7609b..15023009a6d 100644 --- a/aws/resource_aws_cloudwatch_event_target.go +++ b/aws/resource_aws_cloudwatch_event_target.go @@ -102,6 +102,34 @@ func resourceAwsCloudWatchEventTarget() *schema.Resource { }, }, + "batch_target": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "job_definition": { + Type: schema.TypeString, + Required: true, + }, + "job_name": { + Type: schema.TypeString, + Required: true, + }, + "array_size": { + Type: schema.TypeInt, + Optional: true, + ValidateFunc: validation.IntBetween(2, 10000), + }, + "job_attempts": { + Type: schema.TypeInt, + Required: true, + ValidateFunc: validation.IntBetween(1, 10), + }, + }, + }, + }, + "input_transformer": { Type: schema.TypeList, Optional: true, @@ -209,6 +237,12 @@ func resourceAwsCloudWatchEventTargetRead(d *schema.ResourceData, meta interface } } + if t.BatchParameters != nil { + if err := d.Set("batch_target", flattenAwsCloudWatchEventTargetBatchParameters(t.BatchParameters)); err != nil { + return fmt.Errorf("[DEBUG] Error setting batch_target error: %#v", err) + } + } + if t.InputTransformer != nil { if err := d.Set("input_transformer", flattenAwsCloudWatchInputTransformer(t.InputTransformer)); err != nil { return fmt.Errorf("[DEBUG] Error setting input_transformer error: %#v", err) @@ -299,6 +333,9 @@ func buildPutTargetInputStruct(d *schema.ResourceData) *events.PutTargetsInput { if v, ok := d.GetOk("ecs_target"); ok { e.EcsParameters = expandAwsCloudWatchEventTargetEcsParameters(v.([]interface{})) } + if v, ok := d.GetOk("batch_target"); ok { + e.BatchParameters = expandAwsCloudWatchEventTargetBatchParameters(v.([]interface{})) + } if v, ok := d.GetOk("input_transformer"); ok { e.InputTransformer = expandAwsCloudWatchEventTransformerParameters(v.([]interface{})) @@ -344,6 +381,27 @@ func expandAwsCloudWatchEventTargetEcsParameters(config []interface{}) *events.E return ecsParameters } +func expandAwsCloudWatchEventTargetBatchParameters(config []interface{}) *events.BatchParameters { + batchParameters := &events.BatchParameters{} + for _, c := range config { + param := c.(map[string]interface{}) + batchParameters.JobDefinition = aws.String(param["job_definition"].(string)) + batchParameters.JobName = aws.String(param["job_name"].(string)) + if v := param["array_size"]; v != nil { + arrayProperties := &events.BatchArrayProperties{} + arrayProperties.Size = aws.Int64(int64(v.(int))) + batchParameters.ArrayProperties = arrayProperties + } + if v := param["job_attempts"]; v != nil { + retryStrategy := &events.BatchRetryStrategy{} + retryStrategy.Attempts = aws.Int64(int64(v.(int))) + batchParameters.RetryStrategy = retryStrategy + } + } + + return batchParameters +} + func expandAwsCloudWatchEventTransformerParameters(config []interface{}) *events.InputTransformer { transformerParameters := &events.InputTransformer{} @@ -385,6 +443,20 @@ func flattenAwsCloudWatchEventTargetEcsParameters(ecsParameters *events.EcsParam return result } +func flattenAwsCloudWatchEventTargetBatchParameters(batchParameters *events.BatchParameters) []map[string]interface{} { + config := make(map[string]interface{}) + config["job_definition"] = aws.StringValue(batchParameters.JobDefinition) + config["job_name"] = aws.StringValue(batchParameters.JobName) + if batchParameters.ArrayProperties != nil { + config["array_size"] = int(aws.Int64Value(batchParameters.ArrayProperties.Size)) + } + if batchParameters.RetryStrategy != nil { + config["job_attempts"] = int(aws.Int64Value(batchParameters.RetryStrategy.Attempts)) + } + result := []map[string]interface{}{config} + return result +} + func flattenAwsCloudWatchInputTransformer(inputTransformer *events.InputTransformer) []map[string]interface{} { config := make(map[string]interface{}) inputPathsMap := make(map[string]string) diff --git a/aws/resource_aws_cloudwatch_event_target_test.go b/aws/resource_aws_cloudwatch_event_target_test.go index ef69f943d1b..886c643158f 100644 --- a/aws/resource_aws_cloudwatch_event_target_test.go +++ b/aws/resource_aws_cloudwatch_event_target_test.go @@ -139,6 +139,26 @@ func TestAccAWSCloudWatchEventTarget_ecs(t *testing.T) { }, }) } + +func TestAccAWSCloudWatchEventTarget_batch(t *testing.T) { + var target events.Target + rName := acctest.RandomWithPrefix("tf_batch_target") + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSCloudWatchEventTargetDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAWSCloudWatchEventTargetConfigBatch(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckCloudWatchEventTargetExists("aws_cloudwatch_event_target.test", &target), + ), + }, + }, + }) +} + func TestAccAWSCloudWatchEventTarget_input_transformer(t *testing.T) { var target events.Target rName := acctest.RandomWithPrefix("tf_input_transformer") @@ -473,6 +493,155 @@ EOF }`, rName, rName, rName, rName, rName) } +func testAccAWSCloudWatchEventTargetConfigBatch(rName string) string { + return fmt.Sprintf(` +resource "aws_cloudwatch_event_rule" "cloudwatch_event_rule" { + name = "%[1]s" + description = "schedule_batch_test" + schedule_expression = "rate(5 minutes)" +} + +resource "aws_cloudwatch_event_target" "test" { + arn = "${aws_batch_job_queue.batch_job_queue.arn}" + rule = "${aws_cloudwatch_event_rule.cloudwatch_event_rule.id}" + role_arn = "${aws_iam_role.event_iam_role.arn}" + + batch_target { + job_definition = "${aws_batch_job_definition.batch_job_definition}" + job_name = "%[1]s" + } +} + +resource "aws_iam_role" "event_iam_role" { + name = "event_%[1]s" + assume_role_policy = < Date: Mon, 23 Apr 2018 08:25:17 -0400 Subject: [PATCH 565/597] Update CHANGELOG for #4302 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d778ac8ff7..50a01ee10dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Data Source:** `aws_batch_compute_environment` [GH-4270] +* **New Resource:** `aws_dax_subnet_group` [GH-4302] ENHANCEMENTS: From 6d539095171005f65a94f6ea20279648d75087f2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 08:46:14 -0400 Subject: [PATCH 566/597] data-source/aws_iam_instance_profile: Prevent panic when there is no associated role, allow testing in aws-us-gov and aws-cn partitions --- aws/data_source_aws_iam_instance_profile.go | 11 ++++++----- aws/data_source_aws_iam_instance_profile_test.go | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/aws/data_source_aws_iam_instance_profile.go b/aws/data_source_aws_iam_instance_profile.go index e999f7f9a9f..344f3b99de0 100644 --- a/aws/data_source_aws_iam_instance_profile.go +++ b/aws/data_source_aws_iam_instance_profile.go @@ -72,11 +72,12 @@ func dataSourceAwsIAMInstanceProfileRead(d *schema.ResourceData, meta interface{ d.Set("create_date", fmt.Sprintf("%v", instanceProfile.CreateDate)) d.Set("path", instanceProfile.Path) - // 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) + if len(instanceProfile.Roles) > 0 { + 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 411e87c0dfc..c334b04c92a 100644 --- a/aws/data_source_aws_iam_instance_profile_test.go +++ b/aws/data_source_aws_iam_instance_profile_test.go @@ -23,13 +23,13 @@ func TestAccAWSDataSourceIAMInstanceProfile_basic(t *testing.T) { resource.TestMatchResourceAttr( "data.aws_iam_instance_profile.test", "arn", - regexp.MustCompile("^arn:aws:iam::[0-9]{12}:instance-profile/testpath/"+profileName+"$"), + regexp.MustCompile("^arn:[^:]+: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", "role_arn", - regexp.MustCompile("^arn:aws:iam::[0-9]{12}:role/"+roleName+"$"), + regexp.MustCompile("^arn:[^:]+: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), From 39de481a0fe016b66fd4d8b48bf7e736d3319696 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 08:50:28 -0400 Subject: [PATCH 567/597] Update CHANGELOG for #4300 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50a01ee10dd..0e366726026 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] +* data-source/aws_iam_instance_profile: Add `role_arn` and `role_name` attributes [GH-4300] * 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] From 248174a17c5f3ea55c6cc8bc7cf8520582899030 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 09:08:35 -0400 Subject: [PATCH 568/597] Update CHANGELOG for #2984 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e366726026..b2cd3ff72ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Data Source:** `aws_batch_compute_environment` [GH-4270] +* **New Data Source:** `aws_lambda_function` [GH-2984] * **New Resource:** `aws_dax_subnet_group` [GH-4302] ENHANCEMENTS: From 8703b9843ed480963b4db43fa24d459ca698cf86 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 09:26:09 -0400 Subject: [PATCH 569/597] Update CHANGELOG for #4301 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2cd3ff72ed..e09213e88af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ ENHANCEMENTS: * data-source/aws_iam_instance_profile: Add `role_arn` and `role_name` attributes [GH-4300] * resource/aws_api_gateway_rest_api: Add `policy` argument [GH-4211] * resource/aws_api_gateway_stage: Add `tags` argument [GH-2858] +* resource/aws_cognito_user_pool: Support `user_migration` in `lambda_config` [GH-4301] * 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 b4f763553b55797bf35d1ef6d2a7a3b90958968d Mon Sep 17 00:00:00 2001 From: Gregor Heine Date: Mon, 23 Apr 2018 14:59:18 +0100 Subject: [PATCH 570/597] Mark job_attempts optional --- aws/resource_aws_cloudwatch_event_target.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_cloudwatch_event_target.go b/aws/resource_aws_cloudwatch_event_target.go index 15023009a6d..143c3a579a1 100644 --- a/aws/resource_aws_cloudwatch_event_target.go +++ b/aws/resource_aws_cloudwatch_event_target.go @@ -123,7 +123,7 @@ func resourceAwsCloudWatchEventTarget() *schema.Resource { }, "job_attempts": { Type: schema.TypeInt, - Required: true, + Optional: true, ValidateFunc: validation.IntBetween(1, 10), }, }, From 6d35e253f806113fe693a619d951b9d9dac052f7 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 10:19:52 -0400 Subject: [PATCH 571/597] Update CHANGELOG for #4306 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e09213e88af..2e37dd874b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ ENHANCEMENTS: * data-source/aws_iam_instance_profile: Add `role_arn` and `role_name` attributes [GH-4300] * resource/aws_api_gateway_rest_api: Add `policy` argument [GH-4211] * resource/aws_api_gateway_stage: Add `tags` argument [GH-2858] +* resource/aws_api_gateway_vpc_link: Support import [GH-4306] * resource/aws_cognito_user_pool: Support `user_migration` in `lambda_config` [GH-4301] * 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] From 4b60308a109e4e46ce93db646f41bcb20d0820ae Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 11:00:38 -0400 Subject: [PATCH 572/597] tests/resource/aws_kinesis_firehose_delivery_stream: Remove extraneous quotes around boolean configuration --- aws/resource_aws_kinesis_firehose_delivery_stream_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go index a7426a50756..b389939e0d0 100644 --- a/aws/resource_aws_kinesis_firehose_delivery_stream_test.go +++ b/aws/resource_aws_kinesis_firehose_delivery_stream_test.go @@ -1203,7 +1203,7 @@ resource "aws_kinesis_firehose_delivery_stream" "test_stream" { copy_options = "GZIP" data_table_columns = "test-col" processing_configuration = [{ - enabled = "false", + enabled = false, processors = [{ type = "Lambda" parameters = [{ From 5536d8be46b314109255980f4b4983e0996480f0 Mon Sep 17 00:00:00 2001 From: Gregor Heine Date: Mon, 23 Apr 2018 15:56:32 +0100 Subject: [PATCH 573/597] Add missing arn to test compute environments --- aws/data_source_aws_batch_job_queue_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/data_source_aws_batch_job_queue_test.go b/aws/data_source_aws_batch_job_queue_test.go index 64f14b13df0..4a406814b32 100644 --- a/aws/data_source_aws_batch_job_queue_test.go +++ b/aws/data_source_aws_batch_job_queue_test.go @@ -154,14 +154,14 @@ resource "aws_batch_job_queue" "test" { name = "%[1]s" state = "ENABLED" priority = 1 - compute_environments = ["${aws_batch_compute_environment.sample}"] + compute_environments = ["${aws_batch_compute_environment.sample.arn}"] } resource "aws_batch_job_queue" "wrong" { name = "%[1]s_wrong" state = "ENABLED" priority = 2 - compute_environments = ["${aws_batch_compute_environment.sample}"] + compute_environments = ["${aws_batch_compute_environment.sample.arn}"] } data "aws_batch_job_queue" "by_name" { From 47b08e886f492798618beda96ee557b29fe7702a Mon Sep 17 00:00:00 2001 From: Gregor Heine Date: Mon, 23 Apr 2018 15:53:50 +0100 Subject: [PATCH 574/597] Test fixes: add missing ARNs, fix depends_on's --- aws/resource_aws_cloudwatch_event_target_test.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/aws/resource_aws_cloudwatch_event_target_test.go b/aws/resource_aws_cloudwatch_event_target_test.go index 886c643158f..cf0c2a00ea4 100644 --- a/aws/resource_aws_cloudwatch_event_target_test.go +++ b/aws/resource_aws_cloudwatch_event_target_test.go @@ -507,9 +507,15 @@ resource "aws_cloudwatch_event_target" "test" { role_arn = "${aws_iam_role.event_iam_role.arn}" batch_target { - job_definition = "${aws_batch_job_definition.batch_job_definition}" + job_definition = "${aws_batch_job_definition.batch_job_definition.arn}" job_name = "%[1]s" } + + depends_on = [ + "aws_batch_job_queue.batch_job_queue", + "aws_batch_job_definition.batch_job_definition", + "aws_iam_role.event_iam_role", + ] } resource "aws_iam_role" "event_iam_role" { @@ -613,14 +619,14 @@ resource "aws_batch_compute_environment" "batch_compute_environment" { } service_role = "${aws_iam_role.batch_iam_role.arn}" type = "MANAGED" - depends_on = ["aws_iam_role_policy_attachment.aws_batch_service_role"] + depends_on = ["aws_iam_role_policy_attachment.batch_policy_attachment"] } resource "aws_batch_job_queue" "batch_job_queue" { name = "%[1]s" state = "ENABLED" priority = 1 - compute_environments = ["${aws_batch_compute_environment.batch_compute_environment}"] + compute_environments = ["${aws_batch_compute_environment.batch_compute_environment.arn}"] } resource "aws_batch_job_definition" "batch_job_definition" { From 4d2e8320c4be6575d66faa1128582c913e0681be Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 11:08:41 -0400 Subject: [PATCH 575/597] Update CHANGELOG for #4251 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e37dd874b5..53d3f3b4b79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ENHANCEMENTS: * resource/aws_api_gateway_vpc_link: Support import [GH-4306] * resource/aws_cognito_user_pool: Support `user_migration` in `lambda_config` [GH-4301] * resource/aws_instance: Add `credit_specification` argument (e.g. t2.unlimited support) [GH-2619] +* resource/aws_kinesis_firehose_delivery_stream: Support Redshift `processing_configuration` [GH-4251] * 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] From e106efcf175f61ef1cc139c53d2612992f219eda Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 11:14:38 -0400 Subject: [PATCH 576/597] Update CHANGELOG for #4282 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 53d3f3b4b79..0553fa93bfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ ENHANCEMENTS: BUG FIXES: * resource/aws_codebuild_project: Mark auth resource attribute as sensitive [GH-4284] +* resource/aws_s3_bucket: Prevent panic on lifecycle rule reading errors [GH-4282] * data-source/aws_iam_policy_document: Prevent crash with multiple value principal identifiers [GH-4277] ## 1.15.0 (April 18, 2018) From 1f32231cd3f6ddf1595bc65dcbc7d9341f5928d2 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 11:36:10 -0400 Subject: [PATCH 577/597] docs: Add missing after aws_batch_job_queue data source --- website/aws.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/website/aws.erb b/website/aws.erb index 5fd4ee5e6ee..261f4085130 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -60,6 +60,7 @@ > aws_batch_job_queue + > aws_billing_service_account From b5f08ea6d81ce0913408099701f51e26b43db3d5 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 11:37:51 -0400 Subject: [PATCH 578/597] Update CHANGELOG for #4288 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0553fa93bfe..12381a82b90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ FEATURES: * **New Data Source:** `aws_batch_compute_environment` [GH-4270] +* **New Data Source:** `aws_batch_job_queue` [GH-4288] * **New Data Source:** `aws_lambda_function` [GH-2984] * **New Resource:** `aws_dax_subnet_group` [GH-4302] From e2d8cf725a09d313a7680b131e5442b70710d05f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 11:48:08 -0400 Subject: [PATCH 579/597] resource/aws_dax_parameter_group: Prevent panic during empty read, fix import test randomized naming --- aws/resource_aws_dax_parameter_group.go | 7 +++++++ aws/resource_aws_dax_parameter_group_test.go | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/aws/resource_aws_dax_parameter_group.go b/aws/resource_aws_dax_parameter_group.go index 61fad09744a..76df02b2adc 100644 --- a/aws/resource_aws_dax_parameter_group.go +++ b/aws/resource_aws_dax_parameter_group.go @@ -88,6 +88,13 @@ func resourceAwsDaxParameterGroupRead(d *schema.ResourceData, meta interface{}) } return err } + + if len(resp.ParameterGroups) == 0 { + log.Printf("[WARN] DAX ParameterGroup %q not found, removing from state", d.Id()) + d.SetId("") + return nil + } + pg := resp.ParameterGroups[0] paramresp, err := conn.DescribeParameters(&dax.DescribeParametersInput{ diff --git a/aws/resource_aws_dax_parameter_group_test.go b/aws/resource_aws_dax_parameter_group_test.go index 45cfa861aec..7d2989ee3fd 100644 --- a/aws/resource_aws_dax_parameter_group_test.go +++ b/aws/resource_aws_dax_parameter_group_test.go @@ -37,6 +37,7 @@ func TestAccAwsDaxParameterGroup_basic(t *testing.T) { } func TestAccAwsDaxParameterGroup_import(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") resourceName := "aws_dax_parameter_group.test" resource.Test(t, resource.TestCase{ @@ -45,7 +46,7 @@ func TestAccAwsDaxParameterGroup_import(t *testing.T) { CheckDestroy: testAccCheckAwsDaxParameterGroupDestroy, Steps: []resource.TestStep{ resource.TestStep{ - Config: testAccDaxParameterGroupConfig(acctest.RandString(5)), + Config: testAccDaxParameterGroupConfig(rName), }, resource.TestStep{ From a28d44b774cb857974a16cd886beef1f1a73e8a9 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 11:50:03 -0400 Subject: [PATCH 580/597] Update CHANGELOG for #4299 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12381a82b90..b82d13e5302 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ FEATURES: * **New Data Source:** `aws_batch_compute_environment` [GH-4270] * **New Data Source:** `aws_batch_job_queue` [GH-4288] * **New Data Source:** `aws_lambda_function` [GH-2984] +* **New Resource:** `aws_dax_parameter_group` [GH-4299] * **New Resource:** `aws_dax_subnet_group` [GH-4302] ENHANCEMENTS: From ac458d87df282009e946deb3762282cb2fc68707 Mon Sep 17 00:00:00 2001 From: Gregor Heine Date: Mon, 23 Apr 2018 17:19:21 +0100 Subject: [PATCH 581/597] Check that array_size and job_attempts values are within range --- aws/resource_aws_cloudwatch_event_target.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aws/resource_aws_cloudwatch_event_target.go b/aws/resource_aws_cloudwatch_event_target.go index 143c3a579a1..73acb178740 100644 --- a/aws/resource_aws_cloudwatch_event_target.go +++ b/aws/resource_aws_cloudwatch_event_target.go @@ -387,14 +387,14 @@ func expandAwsCloudWatchEventTargetBatchParameters(config []interface{}) *events param := c.(map[string]interface{}) batchParameters.JobDefinition = aws.String(param["job_definition"].(string)) batchParameters.JobName = aws.String(param["job_name"].(string)) - if v := param["array_size"]; v != nil { + if v, ok := param["array_size"].(int); ok && v > 1 && v <= 10000 { arrayProperties := &events.BatchArrayProperties{} - arrayProperties.Size = aws.Int64(int64(v.(int))) + arrayProperties.Size = aws.Int64(int64(v)) batchParameters.ArrayProperties = arrayProperties } - if v := param["job_attempts"]; v != nil { + if v, ok := param["job_attempts"].(int); ok && v > 0 && v <= 10 { retryStrategy := &events.BatchRetryStrategy{} - retryStrategy.Attempts = aws.Int64(int64(v.(int))) + retryStrategy.Attempts = aws.Int64(int64(v)) batchParameters.RetryStrategy = retryStrategy } } From 35f30a4834e58e467b7c86fb74f175aedcb6afc6 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 12:56:46 -0400 Subject: [PATCH 582/597] Update CHANGELOG for #4312 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b82d13e5302..40e4944f6b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ ENHANCEMENTS: * resource/aws_api_gateway_rest_api: Add `policy` argument [GH-4211] * resource/aws_api_gateway_stage: Add `tags` argument [GH-2858] * resource/aws_api_gateway_vpc_link: Support import [GH-4306] +* resource/aws_cloudwatch_event_target: Add `batch_target` argument [GH-4312] * resource/aws_cognito_user_pool: Support `user_migration` in `lambda_config` [GH-4301] * resource/aws_instance: Add `credit_specification` argument (e.g. t2.unlimited support) [GH-2619] * resource/aws_kinesis_firehose_delivery_stream: Support Redshift `processing_configuration` [GH-4251] From c4833e767ccd5dfe0845a100ec0744a177f8021e Mon Sep 17 00:00:00 2001 From: Kash Date: Mon, 23 Apr 2018 13:18:55 -0400 Subject: [PATCH 583/597] add missing disable_api_termination attribute --- aws/data_source_aws_instance.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aws/data_source_aws_instance.go b/aws/data_source_aws_instance.go index 83bd5430135..865a950bea4 100644 --- a/aws/data_source_aws_instance.go +++ b/aws/data_source_aws_instance.go @@ -234,6 +234,10 @@ func dataSourceAwsInstance() *schema.Resource { }, }, }, + "disable_api_termination": { + Type: schema.TypeBool, + Computed: true, + }, }, } } From 05e39f3dfa2f0db501e374b36760c3f7ea9faef9 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 14:00:51 -0400 Subject: [PATCH 584/597] Update CHANGELOG for #4314 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40e4944f6b9..2e94a4477ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,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] * data-source/aws_iam_instance_profile: Add `role_arn` and `role_name` attributes [GH-4300] +* data-source/aws_instance: Add `disable_api_termination` attribute [GH-4314] * resource/aws_api_gateway_rest_api: Add `policy` argument [GH-4211] * resource/aws_api_gateway_stage: Add `tags` argument [GH-2858] * resource/aws_api_gateway_vpc_link: Support import [GH-4306] From 58686cce5a51d03ad825469d29317cda613786ed Mon Sep 17 00:00:00 2001 From: "xiaowei.wang" Date: Mon, 23 Apr 2018 21:01:45 +0200 Subject: [PATCH 585/597] d/lb_listener: set optional arguments as computed --- aws/data_source_aws_lb_listener.go | 3 +++ aws/data_source_aws_lb_listener_test.go | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/aws/data_source_aws_lb_listener.go b/aws/data_source_aws_lb_listener.go index f0357a5b705..37ac1ef94d0 100644 --- a/aws/data_source_aws_lb_listener.go +++ b/aws/data_source_aws_lb_listener.go @@ -17,17 +17,20 @@ func dataSourceAwsLbListener() *schema.Resource { "arn": { Type: schema.TypeString, Optional: true, + Computed: true, ConflictsWith: []string{"load_balancer_arn", "port"}, }, "load_balancer_arn": { Type: schema.TypeString, Optional: true, + Computed: true, ConflictsWith: []string{"arn"}, }, "port": { Type: schema.TypeInt, Optional: true, + Computed: true, ConflictsWith: []string{"arn"}, }, diff --git a/aws/data_source_aws_lb_listener_test.go b/aws/data_source_aws_lb_listener_test.go index 95b24db3f4d..2c6f244c23f 100644 --- a/aws/data_source_aws_lb_listener_test.go +++ b/aws/data_source_aws_lb_listener_test.go @@ -211,6 +211,18 @@ data "aws_lb_listener" "from_lb_and_port" { load_balancer_arn = "${aws_lb.alb_test.arn}" port = "${aws_lb_listener.front_end.port}" } + +output "front_end_load_balancer_arn" { + value = "${data.aws_lb_listener.front_end.load_balancer_arn}" +} + +output "front_end_port" { + value = "${data.aws_lb_listener.front_end.port}" +} + +output "from_lb_and_port_arn" { + value = "${data.aws_lb_listener.from_lb_and_port.arn}" +} `, lbName, targetGroupName) } From 53866e2dba66b9518d765a9cff400253af883ecf Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 15:16:33 -0400 Subject: [PATCH 586/597] Update CHANGELOG for #4317 --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e94a4477ca..79e649dc693 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,9 +29,10 @@ ENHANCEMENTS: BUG FIXES: +* data-source/aws_iam_policy_document: Prevent crash with multiple value principal identifiers [GH-4277] +* data-source/aws_lb_listener: Ensure attributes are properly set when not used as arguments [GH-4317] * resource/aws_codebuild_project: Mark auth resource attribute as sensitive [GH-4284] * resource/aws_s3_bucket: Prevent panic on lifecycle rule reading errors [GH-4282] -* data-source/aws_iam_policy_document: Prevent crash with multiple value principal identifiers [GH-4277] ## 1.15.0 (April 18, 2018) From 66bbe2b81b242a373f24c2cf152b3b60eb63ff10 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 15:35:19 -0400 Subject: [PATCH 587/597] Update CHANGELOG for #4249 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79e649dc693..2ca3ab3d4d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ FEATURES: * **New Data Source:** `aws_lambda_function` [GH-2984] * **New Resource:** `aws_dax_parameter_group` [GH-4299] * **New Resource:** `aws_dax_subnet_group` [GH-4302] +* **New Resource:** `aws_organizations_policy` [GH-4249] ENHANCEMENTS: From a327b8e37362581f3a00988549fa5915ca461e7f Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Wed, 18 Apr 2018 13:51:24 -0400 Subject: [PATCH 588/597] New Resource: aws_organizations_policy_attachment --- aws/provider.go | 1 + ...rce_aws_organizations_policy_attachment.go | 154 ++++++++++++++++++ ...ws_organizations_policy_attachment_test.go | 146 +++++++++++++++++ website/aws.erb | 3 + ...anizations_policy_attachment.html.markdown | 55 +++++++ 5 files changed, 359 insertions(+) create mode 100644 aws/resource_aws_organizations_policy_attachment.go create mode 100644 aws/resource_aws_organizations_policy_attachment_test.go create mode 100644 website/docs/r/organizations_policy_attachment.html.markdown diff --git a/aws/provider.go b/aws/provider.go index 5d519834168..281cbb31fd0 100644 --- a/aws/provider.go +++ b/aws/provider.go @@ -476,6 +476,7 @@ func Provider() terraform.ResourceProvider { "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(), diff --git a/aws/resource_aws_organizations_policy_attachment.go b/aws/resource_aws_organizations_policy_attachment.go new file mode 100644 index 00000000000..b51949e8034 --- /dev/null +++ b/aws/resource_aws_organizations_policy_attachment.go @@ -0,0 +1,154 @@ +package aws + +import ( + "fmt" + "log" + "strings" + "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" +) + +func resourceAwsOrganizationsPolicyAttachment() *schema.Resource { + return &schema.Resource{ + Create: resourceAwsOrganizationsPolicyAttachmentCreate, + Read: resourceAwsOrganizationsPolicyAttachmentRead, + Delete: resourceAwsOrganizationsPolicyAttachmentDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "policy_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "target_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceAwsOrganizationsPolicyAttachmentCreate(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + policyID := d.Get("policy_id").(string) + targetID := d.Get("target_id").(string) + + input := &organizations.AttachPolicyInput{ + PolicyId: aws.String(policyID), + TargetId: aws.String(targetID), + } + + log.Printf("[DEBUG] Creating Organizations Policy Attachment: %s", input) + + err := resource.Retry(4*time.Minute, func() *resource.RetryError { + _, err := conn.AttachPolicy(input) + + if err != nil { + if isAWSErr(err, organizations.ErrCodeFinalizingOrganizationException, "") { + log.Printf("[DEBUG] Trying to create policy attachment again: %q", err.Error()) + return resource.RetryableError(err) + } + + return resource.NonRetryableError(err) + } + + return nil + }) + + if err != nil { + return fmt.Errorf("error creating Organizations Policy Attachment: %s", err) + } + + d.SetId(fmt.Sprintf("%s:%s", targetID, policyID)) + + return resourceAwsOrganizationsPolicyAttachmentRead(d, meta) +} + +func resourceAwsOrganizationsPolicyAttachmentRead(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + targetID, policyID, err := decodeAwsOrganizationsPolicyAttachmentID(d.Id()) + if err != nil { + return err + } + + input := &organizations.ListPoliciesForTargetInput{ + Filter: aws.String(organizations.PolicyTypeServiceControlPolicy), + TargetId: aws.String(targetID), + } + + log.Printf("[DEBUG] Listing Organizations Policies for Target: %s", input) + var output *organizations.PolicySummary + err = conn.ListPoliciesForTargetPages(input, func(page *organizations.ListPoliciesForTargetOutput, lastPage bool) bool { + for _, policySummary := range page.Policies { + if aws.StringValue(policySummary.Id) == policyID { + output = policySummary + return true + } + } + return !lastPage + }) + + if err != nil { + if isAWSErr(err, organizations.ErrCodeTargetNotFoundException, "") { + log.Printf("[WARN] Target does not exist, removing from state: %s", d.Id()) + d.SetId("") + return nil + } + return err + } + + if output == nil { + log.Printf("[WARN] Attachment does not exist, removing from state: %s", d.Id()) + d.SetId("") + return nil + } + + d.Set("policy_id", policyID) + d.Set("target_id", targetID) + return nil +} + +func resourceAwsOrganizationsPolicyAttachmentDelete(d *schema.ResourceData, meta interface{}) error { + conn := meta.(*AWSClient).organizationsconn + + targetID, policyID, err := decodeAwsOrganizationsPolicyAttachmentID(d.Id()) + if err != nil { + return err + } + + input := &organizations.DetachPolicyInput{ + PolicyId: aws.String(policyID), + TargetId: aws.String(targetID), + } + + log.Printf("[DEBUG] Detaching Organizations Policy %q from %q", policyID, targetID) + _, err = conn.DetachPolicy(input) + if err != nil { + if isAWSErr(err, organizations.ErrCodePolicyNotFoundException, "") { + return nil + } + if isAWSErr(err, organizations.ErrCodeTargetNotFoundException, "") { + return nil + } + return err + } + return nil +} + +func decodeAwsOrganizationsPolicyAttachmentID(id string) (string, string, error) { + idParts := strings.Split(id, ":") + if len(idParts) != 2 { + return "", "", fmt.Errorf("expected ID in format of TARGETID:POLICYID, received: %s", id) + } + return idParts[0], idParts[1], nil +} diff --git a/aws/resource_aws_organizations_policy_attachment_test.go b/aws/resource_aws_organizations_policy_attachment_test.go new file mode 100644 index 00000000000..c205ee1e11c --- /dev/null +++ b/aws/resource_aws_organizations_policy_attachment_test.go @@ -0,0 +1,146 @@ +package aws + +import ( + "fmt" + "log" + "testing" + + "github.com/aws/aws-sdk-go/aws" + "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 TestAccAwsOrganizationsPolicyAttachment_account(t *testing.T) { + rName := acctest.RandomWithPrefix("tf-acc-test") + resourceName := "aws_organizations_policy_attachment.test" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAwsOrganizationsPolicyAttachmentDestroy, + Steps: []resource.TestStep{ + { + Config: testAccAwsOrganizationsPolicyAttachmentConfig_Account(rName), + Check: resource.ComposeTestCheckFunc( + testAccCheckAwsOrganizationsPolicyAttachmentExists(resourceName), + resource.TestCheckResourceAttrSet(resourceName, "policy_id"), + resource.TestCheckResourceAttrSet(resourceName, "target_id"), + ), + }, + { + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} + +func testAccCheckAwsOrganizationsPolicyAttachmentDestroy(s *terraform.State) error { + conn := testAccProvider.Meta().(*AWSClient).organizationsconn + + for _, rs := range s.RootModule().Resources { + if rs.Type != "aws_organizations_policy_attachment" { + continue + } + + targetID, policyID, err := decodeAwsOrganizationsPolicyAttachmentID(rs.Primary.ID) + if err != nil { + return err + } + + input := &organizations.ListPoliciesForTargetInput{ + Filter: aws.String(organizations.PolicyTypeServiceControlPolicy), + TargetId: aws.String(targetID), + } + + log.Printf("[DEBUG] Listing Organizations Policies for Target: %s", input) + var output *organizations.PolicySummary + err = conn.ListPoliciesForTargetPages(input, func(page *organizations.ListPoliciesForTargetOutput, lastPage bool) bool { + for _, policySummary := range page.Policies { + if aws.StringValue(policySummary.Id) == policyID { + output = policySummary + return true + } + } + return !lastPage + }) + + if err != nil { + if isAWSErr(err, organizations.ErrCodeTargetNotFoundException, "") { + return nil + } + return err + } + + if output == nil { + return nil + } + + return fmt.Errorf("Policy attachment %q still exists", rs.Primary.ID) + } + + return nil + +} + +func testAccCheckAwsOrganizationsPolicyAttachmentExists(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).organizationsconn + + targetID, policyID, err := decodeAwsOrganizationsPolicyAttachmentID(rs.Primary.ID) + if err != nil { + return err + } + + input := &organizations.ListPoliciesForTargetInput{ + Filter: aws.String(organizations.PolicyTypeServiceControlPolicy), + TargetId: aws.String(targetID), + } + + log.Printf("[DEBUG] Listing Organizations Policies for Target: %s", input) + var output *organizations.PolicySummary + err = conn.ListPoliciesForTargetPages(input, func(page *organizations.ListPoliciesForTargetOutput, lastPage bool) bool { + for _, policySummary := range page.Policies { + if aws.StringValue(policySummary.Id) == policyID { + output = policySummary + return true + } + } + return !lastPage + }) + + if err != nil { + return err + } + + if output == nil { + return fmt.Errorf("Policy attachment %q does not exist", rs.Primary.ID) + } + + return nil + } +} + +func testAccAwsOrganizationsPolicyAttachmentConfig_Account(rName string) string { + return fmt.Sprintf(` +data "aws_caller_identity" "current" {} + +resource "aws_organizations_policy" "test" { + content = "{\"Version\": \"2012-10-17\", \"Statement\": { \"Effect\": \"Allow\", \"Action\": \"*\", \"Resource\": \"*\"}}" + name = "%s" +} + +resource "aws_organizations_policy_attachment" "test" { + policy_id = "${aws_organizations_policy.test.id}" + target_id = "${data.aws_caller_identity.current.account_id}" +} +`, rName) +} diff --git a/website/aws.erb b/website/aws.erb index f06470124b0..4ab8ef7a51b 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -1443,6 +1443,9 @@ > aws_organizations_policy + > + aws_organizations_policy_attachment + diff --git a/website/docs/r/organizations_policy_attachment.html.markdown b/website/docs/r/organizations_policy_attachment.html.markdown new file mode 100644 index 00000000000..4242364389f --- /dev/null +++ b/website/docs/r/organizations_policy_attachment.html.markdown @@ -0,0 +1,55 @@ +--- +layout: "aws" +page_title: "AWS: aws_organizations_policy_attachment" +sidebar_current: "docs-aws-resource-organizations-policy-attachment" +description: |- + Provides a resource to attach an AWS Organizations policy to an organization account, root, or unit. +--- + +# aws_organizations_policy_attachment + +Provides a resource to attach an AWS Organizations policy to an organization account, root, or unit. + +## Example Usage + +### Organization Account + +```hcl +resource "aws_organizations_policy_attachment" "account" { + policy_id = "${aws_organizations_policy.example.id}" + target_id = "123456789012" +} +``` + +### Organization Root + +```hcl +resource "aws_organizations_policy_attachment" "root" { + policy_id = "${aws_organizations_policy.example.id}" + target_id = "r-12345678" +} +``` + +### Organization Unit + +```hcl +resource "aws_organizations_policy_attachment" "unit" { + policy_id = "${aws_organizations_policy.example.id}" + target_id = "ou-12345678" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `policy_id` - (Required) The unique identifier (ID) of the policy that you want to attach to the target. +* `target_id` - (Required) The unique identifier (ID) of the root, organizational unit, or account number that you want to attach the policy to. + +## Import + +`aws_organizations_policy_attachment` can be imported by using the target ID and policy ID, e.g. with an account target + +``` +$ terraform import aws_organization_policy_attachment.account 123456789012:p-12345678 +``` From d000a6b50ef748e6f434cd832e644da07b5adc75 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 23 Apr 2018 15:51:41 -0400 Subject: [PATCH 589/597] Update CHANGELOG for #4253 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ca3ab3d4d5..c676bc5a2a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ FEATURES: * **New Resource:** `aws_dax_parameter_group` [GH-4299] * **New Resource:** `aws_dax_subnet_group` [GH-4302] * **New Resource:** `aws_organizations_policy` [GH-4249] +* **New Resource:** `aws_organizations_policy_attachment` [GH-4253] ENHANCEMENTS: From 64c9cda2a769d1fbe9eda0c0a04a5c87b79be537 Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Mon, 23 Apr 2018 16:50:36 -0400 Subject: [PATCH 590/597] updating URI reference in the aws_api_gateway_integration block --- .../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 37d7e7739f6..a210b113c08 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 @@ -319,7 +319,7 @@ resource "aws_api_gateway_integration" "lambda" { integration_http_method = "POST" type = "AWS_PROXY" - uri = "${aws_lambda_function.main.invoke_arn}" + uri = "${aws_lambda_function.example.invoke_arn}" } ``` From ddc32ee75a76558fd26de6bb63186010e5123ed5 Mon Sep 17 00:00:00 2001 From: Scott Winkler Date: Mon, 23 Apr 2018 15:54:02 -0700 Subject: [PATCH 591/597] add website link --- aws/data_source_aws_iot_endpoint_test.go | 6 ++-- website/aws.erb | 3 ++ website/docs/d/iot_endpoint.html.markdown | 44 +++++++++++++++++++++++ 3 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 website/docs/d/iot_endpoint.html.markdown diff --git a/aws/data_source_aws_iot_endpoint_test.go b/aws/data_source_aws_iot_endpoint_test.go index 0a7a0b51e6c..784a26d63d1 100644 --- a/aws/data_source_aws_iot_endpoint_test.go +++ b/aws/data_source_aws_iot_endpoint_test.go @@ -6,7 +6,7 @@ import ( "github.com/hashicorp/terraform/helper/resource" ) -func TestAccAWSIotEndpoint(t *testing.T) { +func TestAccAWSIotEndpointDataSource(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, @@ -14,8 +14,8 @@ func TestAccAWSIotEndpoint(t *testing.T) { resource.TestStep{ Config: testAccAWSIotEndpointConfig, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttrSet("aws_iot_endpoint.example", "id"), - resource.TestCheckResourceAttrSet("aws_iot_endpoint.example", "endpoint_address"), + resource.TestCheckResourceAttrSet("data.aws_iot_endpoint.example", "id"), + resource.TestCheckResourceAttrSet("data.aws_iot_endpoint.example", "endpoint_address"), ), }, }, diff --git a/website/aws.erb b/website/aws.erb index c9dfcc8a0a5..6e91fae2007 100644 --- a/website/aws.erb +++ b/website/aws.erb @@ -163,6 +163,9 @@ > aws_internet_gateway + > + aws_iot_endpoint + > aws_ip_ranges diff --git a/website/docs/d/iot_endpoint.html.markdown b/website/docs/d/iot_endpoint.html.markdown new file mode 100644 index 00000000000..a8c69f491c9 --- /dev/null +++ b/website/docs/d/iot_endpoint.html.markdown @@ -0,0 +1,44 @@ +--- +layout: "aws" +page_title: "AWS: aws_iot_endpoint" +sidebar_current: "docs-aws-datasource-iot-endpoint" +description: |- + Get the unique IoT endpoint +--- + +# Data Source: aws_iot_endpoint + +Returns a unique endpoint specific to the AWS account making the call. + +## Example Usage + +```hcl +data "aws_iot_endpoint" "example" {} + +resource "kubernetes_pod" "agent" { + metadata { + name = "my-device" + } + spec { + container { + image = "gcr.io/my-project/image-name" + name = "image-name" + + env = [ + { + name = "IOT_ENDPOINT" + value = "${data.aws_iot_endpoint.example.endpoint_address}" + }, + ] + } + } +} +``` + +## Argument Reference + +N/A + +## Attributes Reference + +* `endpoint_address` - The endpoint. The format of the endpoint is as follows: identifier .iot.*region* .amazonaws.com. \ No newline at end of file From 487ad89a2b50cb5864b11020db7df319d8daad39 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 24 Apr 2018 09:06:13 -0400 Subject: [PATCH 592/597] Update CHANGELOG for #3469 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c676bc5a2a4..e8e7e707d39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ ENHANCEMENTS: * data-source/aws_instance: Add `disable_api_termination` attribute [GH-4314] * resource/aws_api_gateway_rest_api: Add `policy` argument [GH-4211] * resource/aws_api_gateway_stage: Add `tags` argument [GH-2858] +* resource/aws_api_gateway_stage: Add `execution_arn` and `invoke_url` attributes [GH-3469] * resource/aws_api_gateway_vpc_link: Support import [GH-4306] * resource/aws_cloudwatch_event_target: Add `batch_target` argument [GH-4312] * resource/aws_cognito_user_pool: Support `user_migration` in `lambda_config` [GH-4301] From ff59f5e162b20dfb323350f264fb6324dde4471b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 24 Apr 2018 09:21:57 -0400 Subject: [PATCH 593/597] docs/resource/aws_ssm_association: Prefer targets InstanceIds over instance_id for schema version 2.0+ --- website/docs/r/ssm_association.html.markdown | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/website/docs/r/ssm_association.html.markdown b/website/docs/r/ssm_association.html.markdown index 0b96e8d4ad4..4ed9898c409 100644 --- a/website/docs/r/ssm_association.html.markdown +++ b/website/docs/r/ssm_association.html.markdown @@ -60,7 +60,10 @@ DOC resource "aws_ssm_association" "foo" { name = "test_document_association-%s" - instance_id = "${aws_instance.foo.id}" + targets { + key = "InstanceIds" + values = "${aws_instance.foo.id}" + } } ``` @@ -71,7 +74,7 @@ The following arguments are supported: * `name` - (Required) The name of the SSM document to apply. * `association_name` - (Optional) The descriptive name for the association. * `document_version` - (Optional) The document version you want to associate with the target(s). Can be a specific version or the default version. -* `instance_id` - (Optional) The instance ID to apply an SSM document to. +* `instance_id` - (Optional) The instance ID to apply an SSM document to. Use `targets` with key `InstanceIds` for document schema versions 2.0 and above. * `output_location` - (Optional) An output location block. Output Location is documented below. * `parameters` - (Optional) A block of arbitrary string parameters to pass to the SSM document. * `schedule_expression` - (Optional) A cron expression when the association will be applied to the target(s). From e951f3a4cda7472117937be2af31335966879b4b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 24 Apr 2018 09:56:11 -0400 Subject: [PATCH 594/597] docs/data-source/aws_iot_endpoint: Fix formatting for endpoint_address --- website/docs/d/iot_endpoint.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/d/iot_endpoint.html.markdown b/website/docs/d/iot_endpoint.html.markdown index a8c69f491c9..1b698b38a41 100644 --- a/website/docs/d/iot_endpoint.html.markdown +++ b/website/docs/d/iot_endpoint.html.markdown @@ -41,4 +41,4 @@ N/A ## Attributes Reference -* `endpoint_address` - The endpoint. The format of the endpoint is as follows: identifier .iot.*region* .amazonaws.com. \ No newline at end of file +* `endpoint_address` - The endpoint. The format of the endpoint is as follows: `IDENTIFIER.iot.REGION.amazonaws.com`. From 0a967f8446dd0e5cbc7a6f950a6327fba073b59b Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 24 Apr 2018 09:56:50 -0400 Subject: [PATCH 595/597] tests/data-source/aws_iot_endpoint: Remove explicit id attribute check --- aws/data_source_aws_iot_endpoint_test.go | 1 - 1 file changed, 1 deletion(-) diff --git a/aws/data_source_aws_iot_endpoint_test.go b/aws/data_source_aws_iot_endpoint_test.go index 784a26d63d1..d4096703230 100644 --- a/aws/data_source_aws_iot_endpoint_test.go +++ b/aws/data_source_aws_iot_endpoint_test.go @@ -14,7 +14,6 @@ func TestAccAWSIotEndpointDataSource(t *testing.T) { resource.TestStep{ Config: testAccAWSIotEndpointConfig, Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttrSet("data.aws_iot_endpoint.example", "id"), resource.TestCheckResourceAttrSet("data.aws_iot_endpoint.example", "endpoint_address"), ), }, From 502adf379da81926e8f32ab077d6b0d1437dc9ee Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 24 Apr 2018 09:58:10 -0400 Subject: [PATCH 596/597] Update CHANGELOG for #4303 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8e7e707d39..590e52eb597 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ FEATURES: * **New Data Source:** `aws_batch_compute_environment` [GH-4270] * **New Data Source:** `aws_batch_job_queue` [GH-4288] +* **New Data Source:** `aws_iot_endpoint` [GH-4303] * **New Data Source:** `aws_lambda_function` [GH-2984] * **New Resource:** `aws_dax_parameter_group` [GH-4299] * **New Resource:** `aws_dax_subnet_group` [GH-4302] From bafcaed7f9b16f93aa67b4191aa15a3a1fa490ff Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 24 Apr 2018 10:09:50 -0400 Subject: [PATCH 597/597] docs/resource/aws_ssm_association: Remove extraneous example resources and just provide fake example references --- website/docs/r/ssm_association.html.markdown | 50 ++------------------ 1 file changed, 3 insertions(+), 47 deletions(-) diff --git a/website/docs/r/ssm_association.html.markdown b/website/docs/r/ssm_association.html.markdown index 4ed9898c409..05aff7a8c3c 100644 --- a/website/docs/r/ssm_association.html.markdown +++ b/website/docs/r/ssm_association.html.markdown @@ -13,56 +13,12 @@ Associates an SSM Document to an instance or EC2 tag. ## Example Usage ```hcl -resource "aws_security_group" "tf_test_foo" { - name = "tf_test_foo" - description = "foo" +resource "aws_ssm_association" "example" { + name = "${aws_ssm_document.example.name}" - ingress { - protocol = "icmp" - from_port = -1 - to_port = -1 - cidr_blocks = ["0.0.0.0/0"] - } -} - -resource "aws_instance" "foo" { - # eu-west-1 - ami = "ami-f77ac884" - availability_zone = "eu-west-1a" - instance_type = "t2.small" - security_groups = ["${aws_security_group.tf_test_foo.name}"] -} - -resource "aws_ssm_document" "foo_document" { - name = "test_document_association-%s" - document_type = "Command" - - content = <